<template>
	<view class="page-index">
		<!-- <uni-swiper-dot :info="info" :current="current" field="content" :mode="mode"> -->
		<!-- 		<swiper class="swiper" circular :autoplay="false" :interval="5000">
			<swiper-item v-for="(item, index) in banner" :key="index">
				<view class="swiper-item"><video :src="item.video[0]" poster="" :controls="true" class="videos" v-if="item.video"></video></view>
			</swiper-item>
		</swiper> -->
		<view class="titleBox" :style="{ height: menu.bottom - menu.top + 'px', position: 'sticky', top: 0 + 'px', 'padding-top': menu.top + 'px', background: background }">
			<!-- <view class="title1">机修修</view> -->
			<image src="/static/home/banner.svg" class="banner"></image>
			<view class="title2">服务已超过3万家门店</view>
			<view class="title3">保障</view>
		</view>
		<view class="topBox" :style="{ 'margin-top': 0 - menu.bottom + 'px' }"></view>
		<!-- </uni-swiper-dot> -->
		<!-- 		<view class="button-box">
			<view class="leftBox" @click="jump('/pages/home/work/index?title=车衣施工')">
				<view class="leftTitle">车衣施工</view>
				<view class="leftPrice"></view>
			</view>
			<view class="rightBox">
				<view class="rightItem"></view>
				<view style="height: 2rpx;text-align: center;display: flex;justify-content: center;"><view style="background: #e8e8e8;height: 2rpx; width: 70%;"></view></view>
				<view class="rightItem"></view>
			</view>
		</view> -->
		<view class="buttonBox" v-if="token">
			<view class="buttonLeft" @click="jump('/pages/home/work/index?title=车衣施工&&id=1')"></view>
			<view class="buttonRight">
				<view class="topMenu" @click="jump('/pages/home/work/index?title=玻璃膜施工&&id=3')"></view>
				<view class="bottomMenu" @click="jump('/pages/home/work/index?title=改色施工&&id=2')"></view>
			</view>
		</view>
		<button class="buttonBox" v-else open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
			<view class="buttonLeft" ></view>
			<view class="buttonRight">
				<view class="topMenu"></view>
				<view class="bottomMenu" ></view>
			</view>
		</button>
		<view class="warrantyBox" @click="jump('/pages/home/warranty/index')" v-if="token">
			
		</view>
		<button class="warrantyBox" v-else open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" >
			
		</button>
		<view class="orderBox">
			<view class="orderTitle">接单动态</view>
			<view class="viewBox">
				
			</view>
			<view class="orderSwiper">
				<view class="viewBox">
					
				</view>
				<swiper class="orderSwiperBox" circular vertical :interval="2000" autoplay >
					<swiper-item v-for="(item, index) in receiveOrderList" :key="index" catchtouchmove>
						<view class="swiperItem " v-for="(items, i) in item" :key="i" style="height: 84rpx;">
							<view class="DtBox">
								<view class="DtTitle">{{ items.receive_date + ' ' + items.car_model + ' ' + items.con_name + ' ' + '已接单' }}</view>
								<view class="DtTips" :style="{ color: items.type == 'today' ? '#FE3838' : '#1fa2ff' }">
									<view class="Tips1">[{{ items.type == 'today' ? '今日施工' : '预约施工' }}]</view>
									<view class="Tips2">[整车]</view>
								</view>
							</view>
						</view>
					</swiper-item>
				</swiper>
			</view>
		</view>
		<view class="caseBox">
			<view class="caseTitle">实时案例</view>
			<uni-easyinput prefixIcon="search" v-model="form.title" placeholder="搜索车型获取达人案例" @iconClick="iconClick" confirmType="search" inputBorder="false" @confirm="search()"></uni-easyinput>
			<view class="caseList">
				<view class="tableBox" scroll-x enable-flex>
					<view :class="[tabIndex == index ? 'tableItemChange' : 'tableItem']" v-for="(item, index) in tabList" :key="index" @click="tableChange(item, index)">{{ item.name }}({{ item.num }})</view>
				</view>
				<!-- <view class="tabBorder" :style="{ 'margin-left': 30 + 175.5 * tabIndex + 'rpx' }"></view> -->
				<view class="searchBox">
					<view class="searchItem" v-for="(item, index) in list" :key="index">
						<view class="time">{{ item.createdate }}</view>
						<view class="type">
							施工车型: {{ item.car_model }}
							<text style="margin-left: 32rpx;">施工项目:{{ item.con_name }}</text>
						</view>
						<view class="imageBox"><image :src="items" class="images" v-for="(items, i) in [item.images[0], item.images[1], item.images[2]]" :key="i" @click="priview(item, i)"></image></view>
					</view>
				</view>
			</view>
		</view>
		<view style="height: 300rpx;"></view>
	</view>
</template>

<script src="./page.js"></script>
<style>
page {
	background: #f7f9f8;
}
</style>
<style scoped lang="scss">
@import 'page.scss';
</style>
